#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n = 0;
	int count = 0;
	int i = 0;
	for (i = 1; i < 100; i++)
	{
		if (i / 10 == 9)
			count++;
		while (1)
		{
			n = i % 10;
			if (n == 9)
			{
				count++;

			}
			break;
		}
		
		


		
	}
	printf("%d", count);
	return 0;
}